<div class="layui-fluid layui-anim website-anim-up" id="website-class-assign" lay-title="评审结果">
    <div class="layui-row layui-col-space8 website-container">
        <div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
            <input type="hidden" id="operation" autocomplete="off" class="layui-input" data-th-value="${operation}"/>
            <input type="hidden" id="topicId" autocomplete="off" class="layui-input" data-th-value="${topicId}"/>
            <input type="hidden" id="topicClassifyCode" autocomplete="off" class="layui-input"
                   data-th-value="${topicClassifyCode}"/>
            <div class="layui-card" id="client-class-expert">
                <div class="layui-card-header">专家组成员信息</div>
                <div class="layui-card-body website-table-full">
                    <div id="showTipExpert"></div>
                    <table id="expertTable" lay-filter="expertTable"
                           lay-data="{id: 'expertTable'}"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<!--表格中的操作栏-->
<script type="text/html" id="expert-option">
    <a lay-event="detail" class="website-green">详情</a>
</script>
<script type="text/html" id="finishType">
    {{#  if(d.reviewFinished){ }}
    <span style="color: green"> 是 </span>
    {{#  } else { }}
    <span style="color: red"> 否 </span>
    {{#  } }}
</script>
<script type="text/html" id="expert-district">
    {{#
    let dict=layui.dict.getByCode(d.districtTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="expert-feature">
    {{#
    let dict=layui.dict.getByCode(d.featureTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="groupNo-class">
    <span>第{{ d.groupNo }}组</span>
</script>
<script data-th-inline="javascript" type="text/javascript">
    layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'website', 'treeSelect', 'dict'], function () {
        let $ = layui.jquery,
            laydate = layui.laydate,
            website = layui.website,
            form = layui.form,
            table = layui.table,
            planId = [[${planId}]],
            dropdown = layui.dropdown,
            $view = $('#website-class-assign'),

            $expertView = $('#client-class-expert'), expertTableIns;
        // 重新渲染 form否则不会显示下拉框
        form.render();
        initExpertTable();

        function initExpertTable() {
            expertTableIns = website.table.init({
                elem: $expertView.find('table'),
                defaultToolbar: [],
                id: 'expertTable',
                url: ctx + 'biz/distribution/list',
                where: {planId: planId},
                cols: [
                    [
                        {type: 'numbers', title: '序号'},
                        {field: 'name', title: '专家姓名', minWidth: 80},
                        {field: 'mobile', title: '联系电话'},
                        {title: '是否完成', templet: '#finishType'},
                        {field: 'reviewFinishedDate', title: '提交时间'},
                        {field: 'reviewText', title: '评审意见'},
                        { title: '评审附件', templet: function (d) {
                                let html = '<a '
                                if (d.fileId) {
                                    html += 'href="' + ctx + 'download/' + d.fileId + '" >'
                                    html += '点击下载'
                                } else {
                                    html += ' >'
                                    html += '无附件'
                                }
                                html += '</a>'
                                return html;
                            }}
                    ]
                ]
            });
        }


    })


</script>